For a compression method for coding a still image to transmit or store it, the standard one called the JPEG (Joint Photographic Expert Group) method is known. As shown in FIG. 10, other than coded data CodeData1 (2-7) obtained by coding image data in predetermined units, for example, units represented in a predetermined color parameter, compressed data used in JPEG comprises control information such as:
start marker information for the compressed data Start (2-4); PA1 end marker information End (2-8) or header information Header (2-5); PA1 start marker information Code1Start (2-9) of the compressed data Code&Ct1Data1 (2-2) in a predetermined unit; and header information Code1Header (2-10). PA1 producing and entering CodeCt1S as shown in step 5-1; PA1 producing and entering CodeCt11 as shown in step 5-2; PA1 providing a field to store the size information Code1Size (4-1) as shown in step 5-3; PA1 initializing a coded data size counter as shown in step 5-4; PA1 transferring and coding the image data represented in a predetermined color parameter as shown in step 5-5; PA1 transferring the coded data for the predetermined color parameter and counting the coded data size as shown in step 5-6; PA1 and entering the coded data size in the Code1Size field as shown in step 5-7. PA1 image data memory means for storing image data temporarily; PA1 coding and decoding means for carrying out a coding process to obtain coded data by coding image data and a decoding process to obtain image data by decoding the coded data; coded data memory means for storing temporarily coded data and control information necessary for transferring the coded data or controlling the decoding process when decoding the coded data; PA1 external device connection means for connecting the image coding and decoding apparatus with external devices which actually transfer and store data; PA1 a coded data size counter for counting the coded data size processed by the coding and decoding means; PA1 and control means for transferring data among the coding and decoding means, image data memory means, coded data memory means and external device connection means, producing for and parsing the control information for the coded data, for adding the control information to the coded data, for extracting the control information from the coded data and for setting parameters necessary for the operation of the coding and decoding means, and the control means comprises coded data dividing means for dividing the coded data into some appropriate size to produce divided coded data blocks and coded data size information addition means for appending to each divided coded data block, when coding image data, control information showing the size of the coded data blocks as the control information. PA1 coded data memory means 1-5 for storing compressed data partially and temporarily; PA1 external device connection means 1-6 for connecting the image coding and decoding apparatus with the external devices which actually transfer and store data; image coding and decoding means 1-2 for coding image data and decoding the coded data; PA1 a coded data size counter 1-3 for counting the size of the coded data processed by the coding and decoding means 1-2; and control means 1-1 for transferring data among the coding and decoding means 1-2, image data memory means 1-4, coded data memory means 1-5 and external device connection means 1-6, for producing and parsing the control information for the coded data, for adding the control information to the coded data, for extracting the control information from the coded data and setting necessary parameters for the coding and decoding means 1-2.
A color space is represented by the combination of the above described parameters. In FIG. 10, 2-1 is start control information CodeCt1S for the whole compressed data, 2-3 is end control information CodeCt1E for the whole compressed data, and 2-6 is start control information CodeCt11 of compressed data for the color parameter unit. In the present specification, the control information such as header information and reserve code necessary for transferring coded data obtained by coding image data or controlling the decoding process when decoding the coded data is referred to as marker information, and the coded data including such control information (marker) is referred to as compressed data.
As described in International Standard Dis10918-1, the length of the control information is predetermined, or even if it is variable, as it comprises control data itself and size information for the control data, its size is easily checked. On the other hand, the coded data CodeData1 (2-7) coded by a variable-length coding method does not include size information for the coded data CodeData1 (2-7) itself.
Therefore, it is difficult to check for the end of the first coded data CodeData1 (2-7), start or end of control information or other coded data which follows the first coded data CodeData1 (2-7).
To extract the coded data CodeData1 (2-7) from the compressed data, as shown by the decoding steps of the conventional example 1 in FIG. 11, it is necessary to parse the control information by reading the control information CodeCt1S (2-1) and CodeCt11 (2-6) from the compressed data expanded in a coded data memory means, set parameters for the coding and decoding means in accordance with the parsed result as shown in steps 3-1, 3-2 and 3-3, read the coded data CodeData1 (2-7), decode it and transfer the image as shown in steps 3-4 and 3-6. In addition to these steps, it is also necessary to separate the coded data from the control information as shown in step 3-5 by comparing the coded data CodeData1 (2-7) with the control information of the next color parameter, for example, Code1Start (2-9) in predetermined units such as bytes. This comparison is repeated until the end marker information End (2-8) has been found as shown in step 3-7.
To repeat such data comparisons to separate the coded data from the control information, however, reduces the processing speed.
To omit the processes for the above described comparisons and separation for coded data and control information when decoding, as described in Japanese unexamined patent application Hei 5-37016 (1993) by the inventors of the present invention and shown in FIG. 12, the size of CodeData1 (2-7) can be written by providing coded data size information Code1Size (4-1) before the coded data CodeData1 (2-7), which is obtained by coding image data represented in a predetermined color parameter. With this size information Code1Size (4-1), it is possible to extract CodeData1 (2-7) without the processes for comparisons and separation when decoding.
With the omission of the processes for comparisons and separation when decoding, the time necessary for storing a received coded image data temporarily in a memory and processing the coded image data stored in this memory is reduced, and thus high speed processing is possible.
With the provision of the coded data size information Code1Size (4-1), however, as shown by the coding steps in FIG. 13, the processing comprises the following complicated steps:
The above described steps 5-1 to 5-7 are repeated until the end of the image data as shown in step 5-8, and after the processing for the whole image data is completed, end control information CodeCt1E is added as shown in step 5-9.
In the above described coding steps in FIG. 13, in order to write the size of corresponding CodeData1 (2-7), CodeData1 (2-7) coded by the coding process (steps 5-5 and 5-6) must be stored temporally in the coded data memory means, by which the memory capacity of the coded data memory means is inevitably increased. Further, if the processing is to be pipelined, there are inevitably restrictions on the degree to which processing can be divided into small units. Here, the processing unit is the size of a block of data for a single operation of coding and transferring, which is repeated, and if the processing unit is large, the time and memory capacity necessary for a single operation is increased.